home *** CD-ROM | disk | FTP | other *** search
- {---------------------------WINAPPS.ORL-----------------------------
- This script sets up a front-end shell for launching Windows appli-
- cations. It is called from DEMO.ORL.
- -------------------------------------------------------------------}
- {Initialize variable}
- Set Mouse_message = 0
-
- {Maximize the window and set the caption}
- SetWindow(MAXIMIZE)
- UseCaption("Launch Windows Applications")
-
- {Set up the menu}
- SetMenu("&Applications",IGNORE,
- "&Notepad",Do_Notepad,
- "&Write",Do_Write,
- "&Paintbrush",Do_Paintbrush,
- "&Cardfile",Do_Cardfile,
- "&PIF Editor",Do_PIFEdit,
- "&SysEdit",Do_SysEdit,
- ENDPOPUP,
- "&Exit!",Shut_Down,
- ENDPOPUP)
-
- {Draw the background}
- UseBackground(TRANSPARENT,255,0,128) {Pink background}
- DrawBackground
-
- {Put large text and icon at top of screen}
- UseFont("Tms Rmn",0,12,BOLD,NOITALIC,NOUNDERLINE,60,0,0)
- DrawText(85,10,"Launch")
- DrawText(52,25,"Windows Applications")
-
- {Draw text boxes}
- UseBrush(SOLID,255,255,255) {White brush}
- Set x1=72
- Set x2=145
- DrawRoundRectangle(x1,48,x2,60,2,2)
- DrawRoundRectangle(x1,63,x2,75,2,2)
- DrawRoundRectangle(x1,78,x2,90,2,2)
- DrawRoundRectangle(x1,93,x2,105,2,2)
- DrawRoundRectangle(x1,108,x2,120,2,2)
- DrawRoundRectangle(x1,123,x2,135,2,2)
-
- {Put the text in each box and a bitmap to left of each box}
- UseFont("System",0,0,NOBOLD,ITALIC,NOUNDERLINE,0,0,0)
- Set x=83
- Set Bit_x=57
- DrawBitmap(Bit_x,48,"WINICON.BMP")
- DrawText(x,51,"Notepad")
- DrawBitmap(Bit_x,63,"WINICON.BMP")
- DrawText(x,66,"Write")
- DrawBitmap(Bit_x,78,"WINICON.BMP")
- DrawText(x,81,"Paintbrush")
- DrawBitmap(Bit_x,93,"WINICON.BMP")
- DrawText(x,96,"Cardfile")
- DrawBitmap(Bit_x,108,"WINICON.BMP")
- DrawText(x,111,"PIF Editor")
- DrawBitmap(Bit_x,123,"WINICON.BMP")
- DrawText(x,126,"SysEdit")
-
- {Put directions box to the left of buttons}
- UseBrush(SOLID,255,255,128) {Cream-colored brush}
- DrawRectangle(10,70,48,98)
- UseFont("System",0,0,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
- DrawText(13,74,"Click on an")
- DrawText(13,79,"item to the")
- DrawText(13,84,"right or select")
- DrawText(13,89,"a menu option")
-
- {Set up mouse input}
- SetMouse(72,48,145,60,Do_Notepad,Temp,Temp, {Notepad button}
- 57,48,68,59,Do_Notepad,Temp,Temp, {Notepad icon}
- 72,63,145,75,Do_Write,Temp,Temp, {Write button}
- 57,63,68,74,Do_Write,Temp,Temp, {Write icon}
- 72,78,145,90,Do_Paintbrush,Temp,Temp, {Paintbrush button}
- 57,78,68,89,Do_Paintbrush,Temp,Temp, {Paintbrush icon}
- 72,93,145,105,Do_Cardfile,Temp,Temp, {Cardfile button}
- 57,93,68,104,Do_Cardfile,Temp,Temp, {Cardfile icon}
- 72,108,145,120,Do_PIFEdit,Temp,Temp, {PIF Editor button}
- 57,108,68,119,Do_PIFEdit,Temp,Temp, {PIF Editor icon}
- 72,123,145,135,Do_SysEdit,Temp,Temp, {SysEdit button}
- 57,123,68,134,Do_SysEdit,Temp,Temp) {SysEdit icon}
-
- {Wait for input}
- Wait_for_Input:
- SetWaitMode(NULL)
- WaitInput()
-
- Do_Notepad:
- SetWaitMode(FOCUS)
- Run("NOTEPAD")
- WaitInput(1)
- Goto Wait_for_Input
-
- Do_Write:
- SetWaitMode(FOCUS)
- Run("WRITE")
- WaitInput(1)
- Goto Wait_for_Input
-
- Do_Paintbrush:
- SetWaitMode(FOCUS)
- Run("PBRUSH")
- WaitInput(1)
- Goto Wait_for_Input
-
- Do_Cardfile:
- SetWaitMode(FOCUS)
- Run("CARDFILE")
- WaitInput(1)
- Goto Wait_for_Input
-
- Do_PIFEdit:
- SetWaitMode(FOCUS)
- Run("PIFEDIT")
- WaitInput(1)
- Goto Wait_for_Input
-
- Do_SysEdit:
- SetWaitMode(FOCUS)
- Run("SYSEDIT")
- WaitInput(1)
- Goto Wait_for_Input
-
- Shut_Down:
- End